package com.qst.rongxiaoserver.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT;

@TableName("tb_finance")
@Data
public class FinanceModel {
    @TableId(type = IdType.AUTO)
    private Integer financeId;

    private Integer bankId;
    private String ownName;
    private String realName;
    private String phone;
    private String idNum;
    private Integer status;
    @NotNull(message = "金额不能为空")
    private BigDecimal money;
    @NotNull(message = "利率不能为空")
    private BigDecimal rate;
    @NotNull(message = "还款周期不能为空")
    private Integer repayment;

    @TableField(value = "create_time", fill = INSERT)
    private Date createTime;
    @TableField(value = "update_time", fill = INSERT)
    private Date updateTime;

    private String combinationName1;  // 组合名称1
    private String combinationPhone1;    // 组合电话1
    private String combinationIdnum1;    // 组合身份证1
    private String combinationName2;    // 组合名称2
    private String combinationPhone2;    // 组合电话2
    private String combinationIdnum2;

    private String fileInfo;
}
